package com.storage.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.storage.system.vo.GoodsDetailInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 产品表 storage_product
 *
 * @author ruoyi
 * @date 2019-08-26
 */
@ApiModel(value = "产品对象")
public class StorageProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;
    /**
     * 产品名称
     */
    @ApiModelProperty(value = "产品名称")
    private String productName;
    /**
     * spu编码(货号)
     */
    @ApiModelProperty(value = "spu编码(货号)")
    private String productSpuCode;
    /**
     * 0-产品;1-新品
     */
    @ApiModelProperty(value = "0-产品;1-新品")
    private Integer newProduct;
    /**
     * 产品所属品牌id
     */
    @ApiModelProperty(value = "产品所属品牌id")
    private Long brandId;
    /**
     * 产品所属品牌名称
     */
    @ApiModelProperty(value = "产品所属品牌名称")
    private String brandName;
    /**
     * 产品所属分类id
     */
    @ApiModelProperty(value = "产品所属分类id")
    private Long categoryId;
    /**
     * 产品所属分类名称
     */
    @ApiModelProperty(value = "产品所属分类名称")
    private String categoryName;
    /**
     * 产品状态(0-未在售;1-在售)
     */
    @ApiModelProperty(value = "产品状态(0-未在售;1-在售)")
    private Integer status;
    /**
     * 商品总数
     */
    @ApiModelProperty(value = "商品总数")
    private Long totalGoodsNum;
    /**
     * 商品实时库存量
     */
    @ApiModelProperty(value = "商品实时库存量")
    private Long realTimeGoodsNum;
    /**
     * 产品拥有者类型:1-代理商;2-店铺
     */
    @ApiModelProperty(value = "产品拥有者类型:1-代理商;2-店铺")
    private Integer ownerType;
    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    private Long createUserId;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String desc;

    /**
     * 客户端查询标志
     */
    private Boolean client = false;

    /** 扩展属性 */
    /**
     * 商品列表
     */
    List<StorageGoods> goods;

    /**
     * 商品图片列表
     */
    List<String> uuids;

    /**
     * 可以查看的品牌列表 - 用于数据查询
     */
    List<String> acceptBrands;

    /**
     * 售卖商品统计
     */
    private Long sellCount;

    /**
     * 商品图片列表
     */
    private List<StorageImage> images;

    /**
     * 客户端库存管理品牌查询参数,多个品牌逗号分隔
     */
    private String clientBrands;
    private List<String> clientBrandsList;

    private Date startTime;
    private Date endTime;
    private String color;
    private String percent;
    private List<GoodsDetailInfo> goodsDetailInfos;

    public String getPercent() {
        return percent;
    }

    public void setPercent(String percent) {
        this.percent = percent;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductSpuCode(String productSpuCode) {
        this.productSpuCode = productSpuCode;
    }

    public String getProductSpuCode() {
        return productSpuCode;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<StorageGoods> getGoods() {
        return goods;
    }

    public void setGoods(List<StorageGoods> goods) {
        this.goods = goods;
    }

    public Integer getNewProduct() {
        return newProduct;
    }

    public void setNewProduct(Integer newProduct) {
        this.newProduct = newProduct;
    }

    public Integer getOwnerType() {
        return ownerType;
    }

    public void setOwnerType(Integer ownerType) {
        this.ownerType = ownerType;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public List<String> getAcceptBrands() {
        return acceptBrands;
    }

    public void setAcceptBrands(List<String> acceptBrands) {
        this.acceptBrands = acceptBrands;
    }

    public List<String> getUuids() {
        return uuids;
    }

    public void setUuids(List<String> uuids) {
        this.uuids = uuids;
    }

    public void setTotalGoodsNum(Long totalGoodsNum) {
        this.totalGoodsNum = totalGoodsNum;
    }

    public Long getRealTimeGoodsNum() {
        return realTimeGoodsNum;
    }

    public void setRealTimeGoodsNum(Long realTimeGoodsNum) {
        this.realTimeGoodsNum = realTimeGoodsNum;
    }

    public Long getTotalGoodsNum() {
        return totalGoodsNum;
    }

    public Long getSellCount() {
        return sellCount;
    }

    public void setSellCount(Long sellCount) {
        this.sellCount = sellCount;
    }

    public List<StorageImage> getImages() {
        return images;
    }

    public void setImages(List<StorageImage> images) {
        this.images = images;
    }

    public List<GoodsDetailInfo> getGoodsDetailInfos() {
        return goodsDetailInfos;
    }

    public void setGoodsDetailInfos(List<GoodsDetailInfo> goodsDetailInfos) {
        this.goodsDetailInfos = goodsDetailInfos;
    }

    public Boolean getClient() {
        return client;
    }

    public void setClient(Boolean client) {
        this.client = client;
    }

    public String getClientBrands() {
        return clientBrands;
    }

    public void setClientBrands(String clientBrands) {
        this.clientBrands = clientBrands;
    }

    public List<String> getClientBrandsList() {
        return clientBrandsList;
    }

    public void setClientBrandsList(List<String> clientBrandsList) {
        this.clientBrandsList = clientBrandsList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StorageProduct product = (StorageProduct) o;
        return Objects.equals(id, product.id) &&
                Objects.equals(productName, product.productName) &&
                Objects.equals(productSpuCode, product.productSpuCode) &&
                Objects.equals(newProduct, product.newProduct) &&
                Objects.equals(brandId, product.brandId) &&
                Objects.equals(brandName, product.brandName) &&
                Objects.equals(categoryId, product.categoryId) &&
                Objects.equals(categoryName, product.categoryName) &&
                Objects.equals(status, product.status) &&
                Objects.equals(totalGoodsNum, product.totalGoodsNum) &&
                Objects.equals(realTimeGoodsNum, product.realTimeGoodsNum) &&
                Objects.equals(ownerType, product.ownerType) &&
                Objects.equals(createUserId, product.createUserId) &&
                Objects.equals(modifyTime, product.modifyTime) &&
                Objects.equals(createTime, product.createTime) &&
                Objects.equals(desc, product.desc) &&
                Objects.equals(goods, product.goods) &&
                Objects.equals(uuids, product.uuids) &&
                Objects.equals(acceptBrands, product.acceptBrands);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, productName, productSpuCode, newProduct, brandId, brandName, categoryId, categoryName, status, totalGoodsNum, realTimeGoodsNum, ownerType, createUserId, modifyTime, createTime, desc, goods, uuids, acceptBrands);
    }
}
